<template>
	<view class="pages">
		<view class="infor">订单信息</view>
		<view class="card1">
			<view class="card11">
				<view>订单号: {{ orderInfo.id }}</view>
				<view>已完成</view>
			</view>
			<view class="card12">服务项目：{{ evaInfo.serviceType.name }}</view>
			<view class="card13">下单时间： {{ orderInfo.orderTime }}</view>
			<view class="card14">预约时间： {{ orderInfo.reservationTime }}</view>
			<view class="card15">车辆： 奔驰FWE4/豫A98FHJ</view>
			<view class="card16">备注:</view>
		</view>

		<view class="detail">订单详情</view>
		<view class="card2">
			<view class="card21">
				<view>车辆精洗</view>
				<view>￥ 199</view>
			</view>
			<view class="card22">
				<view>车辆附加费用</view>
				<view>￥ 199</view>
			</view>
		</view>
		<view class="card3">
			<view class="card31">
				<view>原价</view>
				<view>￥100</view>
			</view>
			<view class="card32">
				<view>优惠</view>
				<view>-￥10</view>
			</view>

			<view class="dirver"></view>
			<view class="card33">
				<view>支付金额</view>
				<view>￥{{ orderInfo.price }}</view>
			</view>
		</view>
		<view class="eva1">评价结果</view>
		<view class="eva2">评价时间：{{ evaInfo.time }}</view>
		<view class="eva3">
			<view>评价结果：</view>
			<view><uni-rate :readonly="true" :value="evaInfo.rate" style="margin-top: -3px" /></view>
		</view>
		<view class="eva4">评语：{{ evaInfo.content }}</view>
	</view>
</template>

<script>
import { mapState } from 'vuex';
export default {
	data() {
		return {
			orderInfo: '',
			evaInfo: '',
			eid:''
		};
	},
	created() {
	
	},
	onLoad(options) {
		var eid = uni.getStorageSync('id');	
		//获取订单详情
		uni.request({
			url: 'http://localhost:9206/order/' + options.id,
			method: 'GET', // 请求方法
			success: (res) => {
				console.log('请求成功:', res);
				this.orderInfo = res.data.data;
			},
			fail: (err) => {
				console.error('请求失败:111', err);
			}
		});
		//获取评论信息
		uni.request({
			url: 'http://localhost:9206/evaluate/' + eid,
			method: 'GET', // 请求方法
			data: {}, // 请求体，传递的数据
			success: (res) => {
				console.log('请求成功111:', res);
				this.evaInfo = res.data.data;
			},
			fail: (err) => {
				console.error('请求失败:111', err);
			}
		});
	},
	methods: {
		// getUser(){
		// 	uni.request({
		// 		url: 'http://localhost:9207/identityVerification/',
		// 		method: 'GET', // 请求方法
		// 		data: {}, // 请求体，传递的数据
		// 		success: (res) => {
		// 			console.log('请求成功111:', res);
		// 			this.evaInfo = res.data.data;
		// 		},
		// 		fail: (err) => {
		// 			console.error('请求失败:111', err);
		// 		}
		// 	});
		// }
	}
};
</script>

<style>
.pages {
	width: 375px;
	height: 812px;
	background-color: rgba(255, 255, 255, 1);
	padding: 8px 13px;
}
.infor {
	width: 72px;
	height: 25px;
	line-height: 25px;
	color: rgba(16, 16, 16, 1);
	font-size: 18px;
	text-align: left;
	font-family: PingFangSC-regular;
}
.card1 {
	padding: 11px 6px;
	box-sizing: border-box;
	width: 351px;
	height: 188px;
	background-color: rgba(255, 255, 255, 1);
	box-shadow: 0px 2px 6px 0px rgba(239, 239, 239, 1);
}
.card11 {
	display: flex;
	width: 100%;
}
.card11 view:nth-child(1) {
	margin-top: 0.5px;
	width: 180px;
	height: 20px;
	color: rgb(16, 16, 16);
	font-size: 14px;
	font-family: PingFangSC-regular;
}
.card11 view:nth-child(2) {
	position: absolute;
	left: 286px;
	top: 43px;
	width: 42px;
	height: 20px;
	line-height: 20px;
	color: rgba(234, 23, 3, 1);
	font-size: 14px;
	font-family: PingFangSC-regular;
}
.card12 {
	margin-top: 7.5px;
	width: 126px;
	height: 20px;
	line-height: 20px;
	color: rgba(16, 16, 16, 1);
	font-size: 14px;
	font-family: PingFangSC-regular;
}
.card13 {
	margin-top: 7.5px;
}
.card14 {
	margin-top: 7.5px;
}
.card15 {
	margin-top: 7.5px;
}
.card16 {
	margin-top: 7.5px;
	width: 350px;
	height: 20px;
	overflow: hidden;
	white-space: nowrap; /* 文本不换行 */
	text-overflow: ellipsis; /* 超出部分显示省略号 */
}
.detail {
	margin-top: 5px;
	width: 72px;
	height: 25px;
	line-height: 25px;
	color: rgb(16, 16, 16);
	font-size: 18px;
	text-align: left;
	font-family: PingFangSC-regular;
}
.card2 {
	width: 348px;
	height: 92px;
	line-height: 20px;
	border-radius: 10px;
	background-color: rgba(255, 255, 255, 1);
	color: rgba(16, 16, 16, 1);
	font-size: 14px;
	text-align: center;
	box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.11);
	font-family: Roboto;
	padding: 11px 16px;
	box-sizing: border-box;
	margin-top: 5px;
}
.card21 {
	display: flex;
}
.card21 view:nth-child(1) {
	color: rgba(16, 16, 16, 1);
	font-size: 14px;
	margin-top: 7px;
}
.card21 view:nth-child(2) {
	margin-top: 7px;
	margin-left: 209px;
	color: rgba(16, 16, 16, 1);
	font-size: 14px;
}
.card22 {
	display: flex;
}
.card22 view:nth-child(1) {
	margin-top: 15px;
}
.card22 view:nth-child(2) {
	margin-top: 15px;
	margin-left: 182px;
}
.card3 {
	padding: 11px 16px;
	box-sizing: border-box;
	margin-top: 5px;
	width: 348px;
	height: 145px;
	line-height: 20px;
	border-radius: 10px;
	background-color: rgba(255, 255, 255, 1);
	color: rgba(16, 16, 16, 1);
	font-size: 14px;
	text-align: center;
	box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.11);
	font-family: Roboto;
}
.card31 {
	display: flex;
}
.card31 view:nth-child(1) {
	margin-top: 10px;
}
.card31 view:nth-child(2) {
	margin-top: 10px;
	margin-left: 235px;
	width: 37px;
	height: 20px;
	line-height: 20px;
	color: rgb(16, 16, 16);
	font-size: 14px;
	text-align: left;
	font-family: PingFangSC-regular;
}
.card32 {
	display: flex;
}
.card32 view:nth-child(1) {
	margin-top: 12px;
}
.card32 view:nth-child(2) {
	margin-top: 12px;
	margin-left: 235px;
	width: 37px;
	height: 20px;
	line-height: 20px;
	color: rgba(255, 37, 37, 1);
	font-size: 14px;
	text-align: left;
	font-family: PingFangSC-regular;
}
.dirver {
	width: 340px;
	margin-left: -11px;
	height: 1px;
	background-color: rgba(255, 255, 255, 1);
	border: 1px solid rgba(187, 187, 187, 1);
	margin-top: 15px;
}
.card33 {
	display: flex;
}
.card33 view:nth-child(1) {
	margin-top: 15px;
}
.card33 view:nth-child(2) {
	margin-top: 15px;
	margin-left: 209px;
	width: 49px;
	height: 20px;
	line-height: 20px;
	color: rgba(16, 16, 16, 1);
	font-size: 14px;
	text-align: left;
	font-family: PingFangSC-regular;
}
.eva1 {
	margin-top: 15px;
	width: 56px;
	height: 20px;
	line-height: 20px;
	color: rgba(16, 16, 16, 1);
	font-size: 14px;
	text-align: left;
	font-family: PingFangSC-regular;
}
.eva2 {
	margin-top: 12px;
	width: 200px;
	height: 20px;
	line-height: 20px;
	color: rgba(16, 16, 16, 1);
	font-size: 14px;
	text-align: left;
	font-family: PingFangSC-regular;
}
.eva3 {
	margin-top: 12px;
	display: flex;
	height: 20px;
	line-height: 20px;
	color: rgba(16, 16, 16, 1);
	font-size: 14px;
	text-align: left;
	font-family: PingFangSC-regular;
}
.eva4 {
	margin-top: 12px;
	width: 294px;
	height: 20px;
	line-height: 20px;
	color: rgba(16, 16, 16, 1);
	font-size: 14px;
	text-align: left;
	font-family: PingFangSC-regular;
}
</style>
